package org.jeecg.modules.demo.caiWuSkd.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: cw_skd
 * @Author: jeecg-boot
 * @Date:   2021-12-14
 * @Version: V1.0
 */
@Data
@TableName("cw_skd")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="cw_skd对象", description="cw_skd")
public class CwSkd implements Serializable, Comparable<CwSkd>{
    private static final long serialVersionUID = 1L;

	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private String id;
	/**收款单号*/
	@Excel(name = "收款单号", width = 15)
    @ApiModelProperty(value = "收款单号")
    private String skNo;
	/**部门*/
	@Excel(name = "部门", width = 15)
    @ApiModelProperty(value = "部门")
    @Dict(dictTable = "sys_depart",dicCode = "id",dicText = "depart_name")
    private String dept;
	/**单据日期*/
	@Excel(name = "单据日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "单据日期")
    private Date puCdate;
	/**业务类型(1普通收款2预收款3直接收款4预收款抵扣5期初收款6期初预收款)*/
	@Excel(name = "业务类型(1普通收款2预收款3直接收款4预收款抵扣5期初收款6期初预收款)", width = 15)
    @ApiModelProperty(value = "业务类型(1普通收款2预收款3直接收款4预收款抵扣5期初收款6期初预收款)")
    @Dict(dicCode = "skd_ywType")
    private String ywType;
	/**业务员*/
	@Excel(name = "业务员", width = 15)
    @ApiModelProperty(value = "业务员")
    @Dict(dictTable = "sys_user",dicText = "realname",dicCode = "id")
    private String ywName;
	/**结算客户*/
	@Excel(name = "结算客户", width = 15)
    @ApiModelProperty(value = "结算客户")
    private String jsCustom;
	/**使用预收*/
	@Excel(name = "使用预收", width = 15)
    @ApiModelProperty(value = "使用预收")
    private String syys;
	/**销售结算单号*/
	@Excel(name = "销售结算单号", width = 15)
    @ApiModelProperty(value = "销售结算单号")
    private String sosNo;
	/**折让*/
	@Excel(name = "折让", width = 15)
    @ApiModelProperty(value = "折让")
    private Double zr;
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
	/**发票号*/
	@Excel(name = "发票号", width = 15)
    @ApiModelProperty(value = "发票号")
    private String fpNo;
	/**结算方式*/
	@Excel(name = "结算方式", width = 15)
    @ApiModelProperty(value = "结算方式")
    @Dict(dicCode="so_jiesuan")
    private String jsType;
	/**账号名称*/
	@Excel(name = "账号名称", width = 15)
    @ApiModelProperty(value = "账号名称")
    private String zhName;
	/**实际收款金额*/
	@Excel(name = "实际收款金额", width = 15)
    @ApiModelProperty(value = "实际收款金额")
    private BigDecimal skJinen;
	/**拆让分摊*/
	@Excel(name = "拆让分摊", width = 15)
    @ApiModelProperty(value = "拆让分摊")
    private String isCrft;
	/**核销单号*/
	@Excel(name = "核销单号", width = 15)
    @ApiModelProperty(value = "核销单号")
    private String hxNo;
	/**销售订单号*/
	@Excel(name = "销售订单号", width = 15)
    @ApiModelProperty(value = "销售订单号")
    private String soNo;
	/**结算数量*/
	@Excel(name = "结算数量", width = 15)
    @ApiModelProperty(value = "结算数量")
    private BigDecimal sosNum;
	/**结算单价*/
	@Excel(name = "结算单价", width = 15)
    @ApiModelProperty(value = "结算单价")
    private BigDecimal sosPrice;
	/**结算总金额*/
	@Excel(name = "结算总金额", width = 15)
    @ApiModelProperty(value = "结算总金额")
    private BigDecimal sosAmount;
	/**结算不含税总价*/
	@Excel(name = "结算不含税总价", width = 15)
    @ApiModelProperty(value = "结算不含税总价")
    private BigDecimal sosNotax;
	/**使用预收款抵扣单号*/
	@Excel(name = "使用预收款抵扣单号", width = 15)
    @ApiModelProperty(value = "使用预收款抵扣单号")
    private String srNo;
    /**订单状态（0：未审，1：已审，2：已关闭）*/
    @Excel(name = "订单状态（0：未审，1：已审，2：已关闭）", width = 15)
    @ApiModelProperty(value = "订单状态（0：未审，1：已审，2：已关闭）")
    private Integer soStatus;
    /**删除状态（0：未删，1：已删）*/
    @Excel(name = "删除状态（0：未删，1：已删）", width = 15)
    @ApiModelProperty(value = "删除状态（0：未删，1：已删）")
    private Integer isDelete;
    /**税额*/
    @Excel(name = "税额", width = 15)
    @ApiModelProperty(value = "税额")
    private BigDecimal psTax;
    /**收款金额*/
    @Excel(name = "收款金额", width = 15)
    @ApiModelProperty(value = "收款金额")
    private BigDecimal skJinee;
    /**无税单价*/
    @Excel(name = "无税单价", width = 15)
    @ApiModelProperty(value = "无税单价")
    private BigDecimal wsdj;
    /**项目*/
    @Excel(name = "项目", width = 15)
    @ApiModelProperty(value = "项目")
    @Dict(dictTable = "pj_project",dicCode ="id",dicText="pj_name")
    private String project;
    /**审核人*/
    @Excel(name = "审核人", width = 15)
    @ApiModelProperty(value = "审核人")
    @Dict(dictTable = "sys_user",dicCode ="id",dicText="realname")
    private String shName;
    /**审核时间*/
    @Excel(name = "审核时间", width = 15)
    @ApiModelProperty(value = "审核时间")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Date shTime;
    /**使用预收款单预收金额*/
    @Excel(name = "使用预收款单预收金额", width = 15)
    @ApiModelProperty(value = "使用预收款单预收金额")
    private BigDecimal syyskJine;
    /**附件*/
    @Excel(name = "附件", width = 15)
    @ApiModelProperty(value = "附件")
    private String fj;
    /**备注*/
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
    /**费用类型*/
    @Excel(name = "费用类型", width = 15)
    @ApiModelProperty(value = "费用类型")
    @Dict(dicCode="feiyongType")
    private String fyType;
    /**租户id*/
    @Excel(name = "租户id", width = 15)
    @ApiModelProperty(value = "租户id")
    private Integer tenantId;
    /**编辑专用金额*/
    @Excel(name = "编辑专用金额", width = 15)
    @ApiModelProperty(value = "编辑专用金额")
    private BigDecimal bjJine;
    /**内部编号*/
    @Excel(name = "内部编号", width = 15)
    @ApiModelProperty(value = "内部编号")
    private String tradecode;
    /**使用预收总共收款金额*/
    @Excel(name = "使用预收总共收款金额", width = 15)
    @ApiModelProperty(value = "使用预收总共收款金额")
    private BigDecimal zskJine;
    /**使用预收款单号*/
    @Excel(name = "使用预收款单号", width = 15)
    @ApiModelProperty(value = "使用预收款单号")
    private String syyskNo;
    /**编辑使用预收款单号*/
    @Excel(name = "编辑使用预收款单号", width = 15)
    @ApiModelProperty(value = "编辑使用预收款单号")
    private String bjSyyskno;
    /**编辑预收款专用金额*/
    @Excel(name = "编辑预收款专用金额", width = 15)
    @ApiModelProperty(value = "编辑预收款专用金额")
    private BigDecimal bjYskjine;
    /**期初收款单号*/
    @Excel(name = "期初收款单号", width = 15)
    @ApiModelProperty(value = "期初收款单号")
    private String qcskNo;
    /**创建人*/
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**机构编码*/
    @ApiModelProperty(value = "机构编码")
    private String sysOrgCode;


    //临时字段
    @TableField(exist= false)
    private BigDecimal lsJine;
    @TableField(exist= false)
    private BigDecimal supamount;
    @TableField(exist= false)
    private BigDecimal shengyuyskjine;
    @TableField(exist= false)
    private BigDecimal surplusJine;
    @TableField(exist = false)
    private String column;
    @TableField(exist = false)
    private String order;

    @Override
    public int compareTo(CwSkd o) {
        return o.getCreateTime().compareTo(this.createTime);
    }
}
